<form class="layui-form">
    <div class="layui-input-inline">
        <a class="layui-btn" href="{:url('Drivemanage/adddrive')}">添加驾驶员</a>
    </div>
</form>
<table class="layui-table" lay-filter="edit-table" lay-data="{method: 'post',loading:'true', url:'{:url('Drivemanage/platformdrive')}', page:true, id:'idDemo'}" lay-filter="test">
    <thead>
    <tr>
        <th lay-data="{field:'store_name'}">所属分公司</th>
        <th lay-data="{field:'drive_name'}">姓名</th>
        <th lay-data="{field:'drive_sex'}">性别</th>
        <th lay-data="{field:'drive_tel'}">电话</th>
        <th lay-data="{toolbar:'#company_name'}">派往单位</th>
        <th lay-data="{toolbar:'#company_address'}">位置信息</th>
        <th lay-data="{toolbar:'#drive_status'}">工作状态</th>
        <th lay-data="{toolbar:'#info',width:260,}">操作</th>
    </tr>
    </thead>
</table>
<script type="text/html" id="company_name">
    {{#  if(d.drive_isgo == 1){ }}
    {{d.company_name}}
    {{#  } else if(d.drive_isgo == 2) { }}
    {{d.store_name}}
    {{#  } }}
</script>
<script type="text/html" id="company_address">
    {{#  if(d.drive_isgo == 1){ }}
    {{d.company_address}}
    {{#  } else if(d.drive_isgo == 2){ }}
    {{d.store_address}}
    {{#  } }}
</script>
<script type="text/html" id="drive_status">
    {{#  if(d.drive_status == 1){ }}
    上班
    {{#  } else if(d.drive_status == 2){ }}
    下班
    {{#  } else if(d.drive_status == 3) { }}
    请假
    {{#  } else if(d.drive_status == 4) { }}
    离职
    {{#  } else if(d.drive_status == 5) { }}
    加班
    {{#  } else if(d.drive_status == 6) { }}
    值班
    {{#  } else if(d.drive_status == 7) { }}
    交通事故
    {{#  } }}
</script>
<script type="text/html" id="info">
    {{#  if(d.drive_longitude == null){ }}
    <span style="color: #eea236" >暂无位置信息</span>
    {{#  } else if(d.drive_latitude == null) { }}
    <span style="color: #eea236" >暂无位置信息</span>
    {{#  } else{ }}
    <a class="layui-btn  layui-btn-xs " href="http://m.amap.com/navi/?dest={{ d.drive_longitude }},{{ d.drive_latitude }}&hideRouteIcon=1&destName={{ d.drive_name }}&key=d76a846aa32a0dfd9a58e788b16bdc74">地图信息</a>
    {{#  } }}
    <a class="layui-btn layui-btn-normal layui-btn-xs  edit-table" href="{:url('Drivemanage/driveWorkLog')}?id={{d.drive_id}}&type=1">工作记录</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs  edit-table " href="{:url('Drivemanage/signLog')}?id={{d.drive_id}}">签到记录</a>
</script>


